import React from 'react'
import LayoutPage from "../layout";
import Dashboard from "../pages/Dashboard";
import OrderManagement from "../pages/OrderManagement";
import RoleManagement from "../pages/RoleManagement";
import {routes} from '../interface'
import {
    AppstoreOutlined,
    MenuUnfoldOutlined,
    MenuFoldOutlined,
    PieChartOutlined,
    DesktopOutlined,
    ContainerOutlined,
    MailOutlined,
  } from '@ant-design/icons';
import Login from '../pages/Login';
export const routerList: routes[] = [
	{
		from: "/",
		to: "/layout",
	},
	{
		path: "/login",
		component: Login,
	},
	{
		path: "/layout",
		component: LayoutPage,
		children: [
			{
				from: "/layout",
				to: "/layout/dashboard",
			},
			{
				path: "/layout/dashboard",
				component: Dashboard,
				meta: {
					icon: AppstoreOutlined,
					title:"仪表盘"
				}
			},
			{
				path: "/layout/OrderManagement",
				component: OrderManagement,
				meta: {
					role: ["admin", "editor"],
					icon: MenuUnfoldOutlined,
					title:"订单管理"
				},
			},
			{
				path: "/layout/RoleManagement",
				component: RoleManagement,
				meta: {
					role: ["admin"],
					icon: PieChartOutlined,
					title:"角色管理"
				},
			},
		],
	},
];
